package crazy.java.cha09;

import java.util.List;

/**
 * @author futao
 * Created on 2017/12/1 - 14:28.
 */
public class B<E> extends A {
    private E e;

    public B(E e) {
        super(e);
        this.e = e;
    }

    public void niu(List<?> list) {
        for (Object o : list) {
            System.out.println("00"+o);
        }
    }

    public void niuBi(List<E> a) {
        for (E e1 : a) {
            System.out.println("eee"+e1);
        }
    }

    public static void main(String[] args) {
        A a = new B<>(11);
        B b = new B(12);
        if (b instanceof A && b instanceof B) {
            A b1 = (A) b;
            System.out.println("shi");
        }
        System.out.println(a.getT());
    }

    @Override
    public String toString() {
        return "B{" +
                "e=" + e +
                '}';
    }

    public E getE() {
        return e;
    }

    public void setE(E e) {
        this.e = e;
    }
}
